/*
 * @Description: Description
 * @Author: zhaojiansen
 * @Date: 2022-10-18 13:14:16
 * @LastEditors: zhaojiansen
 * @LastEditTime: 2022-11-05 10:28:19
 */
import request from '@/utils/request'
const serviceCategory = window.CONFIG.services.wecom + '/category'
export function multimediaGroup(params,data) {
  return request({
    url: serviceCategory + '/list', params,data,
    method: 'get',
  })
}


// export function createAccess(data) {
//   return request({
//      url: `/admin/wecom/material/${data.id}`,
//      method: 'get',
//      })
// }
// levelType: 0,
// mediaType: 7,
// // levelId: this.type.id,
// materialName: this.input2,
// pageNum: this.pageNum,
// pageSize: this.pageSize,

export function personalAccess(query) {
  return request({
    url: "/admin/wecom/material/media" ,
    method: 'get',
    params: query
  })
}
export function deleteInterface(data) {
  return request({
    url: "/admin/remove" ,
    method: 'POST',
    data })
}
export function createGroup(data) {
  return request({
    url: serviceCategory + '/corp/add',
    method: 'POST',
    data })
}
export function createGroups(data) {
  return request({
    url: serviceCategory + '/corp/edit',
    method: 'put',
    data })
}
export function removeTree(ids) {
  return request({
    url: serviceCategory + '/corp/' + ids,
    method: 'DELETE'
  })
}

export function createGroup1(data) {
  return request({
    url: serviceCategory + '/personal/add',
    method: 'POST',
    data })
}
export function createGroups1(data) {
  return request({
    url: serviceCategory + '/personal/edit',
    method: 'put',
    data })
}
export function removeTree1(ids) {
  return request({
    url: serviceCategory + '/personal/' + ids,
    method: 'DELETE'
  })
}

export function personalDeleted(ids) {
  return request({
    url:"/admin/wecom/material" + '/' + ids,
    method: 'DELETE'
  })
}
export function IndividualEditor(data) {
  return request({
    url:"/admin/wecom/material/media",
    method: 'put',
    data })
}
export function createAccess(data) {
  return request({
    url: `/admin/wecom/material/${data.id}`,
    method: 'get',
  })
}

//多媒体编辑企业库素材
export function IndividualEditorCorp(data) {
  return request({
    url:"/admin/wecom/material/media/corp",
    method: 'put',
    data })
}

//多媒体删除企业库素材
export function personalDeletedCorp(ids) {
  return request({
    url:"/admin/wecom/material/corp" + '/' + ids,
    method: 'DELETE'
  })
}

